package com.ruoyi.model.user;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Desensitization;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.enums.DesensitizationTypeEnum;
import com.ruoyi.model.enums.SexType;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author 张怀秋
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("web_user_info")
public class UserInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 用户主键id
     */
    private String id;

    /**
     * 用户名
     */
    @Excel(name = "用户名")
    @Desensitization(type = DesensitizationTypeEnum.CHINESE_NAME)
    private String name;

    private String nickName;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 账号/手机号
     */
    @Excel(name = "邮箱")
    @Desensitization(type = DesensitizationTypeEnum.EMAIL)
    private String email;

    @Desensitization(type = DesensitizationTypeEnum.MOBILE_PHONE)
    private String phone;

    /**
     * 密码
     */
    @Excel(name = "密码")
    private String password;

    /**
     * 性别
     */
    @Excel(name = "性别")
    private Integer sex;

    /**
     * 个性签名
     */
    @Excel(name = "个性签名")
    private String signature;

    /**
     * 学校（院系）
     */
    @Excel(name = "学校", readConverterExp = "院=系")
    private String school;

    /**
     * 专业
     */
    @Excel(name = "专业")
    private String specialized;

    /**
     * 入学时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入学时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date matriculationTime;

    /**
     * 毕业时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "毕业时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date graduateTime;

    /**
     * 学历
     */
    @Excel(name = "学历")
    private String degree;
    private Integer status;

    /**
     * 是否为组织者账号
     */
    @Excel(name = "是否为组织者账号")
    private String isOrganization;

    /**
     * 联系方式
     */
    @Excel(name = "联系方式")
    private String contact;

    /**
     * 是否展示
     */
    @Excel(name = "是否展示")
    private String isShow;

    /**
     * 是否删除
     */
    @Excel(name = "是否删除")
    @TableLogic
    private String isDel;


}
